<template>
  <div class="h-panel">
    <PaasIndexBar></PaasIndexBar>
    <PaasPageTable :columns="columns"></PaasPageTable>
  </div>
</template>

<script>
export default {
  mounted() { },
  data() {
    return {
      dbType: [{ 1: "标题" }],
      dbType2: [{ value: "1", label: "标题" }],
      columns: [
        { title: "项目名称", prop: "name" },
        {
          title: "后台类型",
          prop: "serverType",
          render: (d) =>
            this.StaticFunc.reader(this, "ServerType", d.serverType),
        },
        {
          title: "UI类型",
          prop: "uiType",
          render: (d) => this.StaticFunc.reader(this, "UiType", d.uiType),
        },
        { title: "包名称", prop: "pkgName" },
        {
          title: "数据库",
          prop: "dbType",
          render: (d) => this.StaticFunc.reader(this, "DbType", d.dbType),
        },
        { title: "所属团队", prop: "groupMember" },
        { title: "创建用户", prop: "crtOpr" },
        { title: "创建时间", prop: "crtTs" },
      ],
    };
  },
  methods: {
    generator(data) {
      if (data != null && !!data) {

        this.$store.dispatch("download", {
          url: "/generator/" + data.id,
          data: data,
        });
      }
    },
    download(data) {
      if (data != null && !!data) {
        this.$store.dispatch("download", {
          url: "/download/" + data.id,
          data: data,
        });
      }
    },
    downDoc(data) {
      if (data != null && !!data) {
        this.$store.dispatch("download", {
          url: "/doc/" + data.id,
          data: data,
        });
      }
    },
  },
};
</script>
